using System;
using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;

namespace TCP232.Views
{
    public enum ButtonResult
    {
        Ok,
        Cancel,
        None
    }

    public partial class MessageWindow : Window
    {
        public MessageWindow()
        {
            InitializeComponent();
            var screen = Screens.All.FirstOrDefault();
            if (screen != null)
            {
                MaxHeight = screen.WorkingArea.Height;
                MaxWidth = screen.WorkingArea.Width - 200;
            }
        }

        public ButtonResult ButtonResult { get; set; } = ButtonResult.None;

        private void ButtonOK_OnClick(object sender, RoutedEventArgs e)
        {
            ButtonResult = ButtonResult.Ok;
            Close();
        }
    }
}